{% extends "mock/base.html" %}
{% block title%}
    <title>编辑 Server</title>
{% endblock %}

{% block content %}
    <!--添加表单-->
{#<div class="container-fluid">#}
{#    <div class="row">#}
{#        <div class="col-md-8 col-md-offset-2">#}
{#            <h2 class="text-center">编辑页面</h2>#}
{#            <form action="" method="post">#}
{#                name:<input type="text" class="form-control" name="username" value="{{ edit_obj.username }}">#}
{##}
{#                path:<input type="text" class="form-control" name="password" value="{{ edit_obj.password }}">#}
{##}
{#                <br>#}
{#                <input type="submit" class="btn btn-warning">#}
{#            </form>#}
{##}
{#        </div>#}
{#    </div>#}
{#</div>#}
      <div class="row" style="margin-top: 80px;">
        <div class="page-header">
            <h3 style="margin-left: 150px;"> 编辑API_SERVER </h3>
        </div>

        <div class="col-md-6" style="width: 800px;">

          <form class="form-horizontal" role="form" action="" method="post" style="margin-left: 30px;">


                  <div class="form-group">
                      <label for="firstname" class="col-sm-2 control-label">name:</label>
                      <div class="col-sm-10">
                         <input name="name" type="text" class="form-control" value="{{ server_obj.name }}">
                      </div>
                  </div>

                <div class="form-group">
                      <label for="lastname" class="col-sm-2 control-label">path:</label>
                      <div class="col-sm-10">
                         <input name="path" type="text" class="form-control" value="{{ server_obj.path }} ">
                      </div>
                </div>

            <div class="form-group">
              <div class="err" id="div1">{% for key,error in editserver_form.errors.items %}{{ error }} {% endfor %} {{ msg }}</div>
              <div class="col-sm-offset-2 col-sm-10" id="div2">
                <button type="submit" class="btn btn-warning">编辑</button>
              </div>
            </div>
            {% csrf_token %}
          </form>

        </div>
      </div>
{% endblock %}